package com.gjsrmyy.edi.quartz;

import com.gjsrmyy.edi.service.ClientService;
import com.gjsrmyy.edi.service.ClientServiceImpl;
import com.sun.org.apache.bcel.internal.generic.NEW;
import lombok.extern.java.Log;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;


@Log
public class PerMinuteJob implements Job {
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        ClientService service = new ClientServiceImpl();

        try {
            // 商品
            service.uploadGoodsDirOfConsumables();
            service.uploadGoodsDirOfDrugs();

            // 采购计划
            service.uploadProcurementPlanOfDrugs();
            service.uploadProcurementPlanOfConsumables();

            // 输出
            service.outputOfDrugs();
            service.outputOfConsumables();

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
